/**
 * Created by charlie on 18-1-11.
 */
import React from 'react'
import UI from '../components/personalInfoes'
import {connect} from 'dva-no-router'
import {bindActionCreators} from 'redux'
import {View} from 'react-native'

class PersonalInfoes extends React.Component {
    componentWillMount(){
        const {getInfoes}=this.props;
        getInfoes();
    }
    // componentDidMount() {
    //     const {getInfoes}=this.props;
    //     getInfoes();
    // }
    componentWillUnmount(){
        const {getClean}=this.props;
        getClean();
    }

    render(){
        return(
            <UI  {...this.props} />
        )
    }
}

const actions ={
    getInfoes:() =>({type:'personalInfoes/getInfoes'}),
    getClean:() =>({type:'personalInfoes/getClean'}),
};
const mapProps = ({personalInfoes}) =>({personalInfoes});
const mapActions = dispatch =>({
    ...bindActionCreators({...actions},dispatch)
});
export default connect (mapProps,mapActions)(PersonalInfoes)